package com.gxuwz.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.business.service.ISysRoleRightService;
import com.gxuwz.business.dao.impl.SysRoleRightDAO;
import com.gxuwz.business.entity.SysRoleRight;
@Service("sysRoleRightService")
public class SysRoleRightServiceImpl implements ISysRoleRightService {
  
	@Autowired
	private SysRoleRightDAO sysRoleRightDAO;
	@Override
	public List<SysRoleRight> findByRole(String roleId) {
		// TODO Auto-generated method stub
		return sysRoleRightDAO.findByRoleId(roleId);
	}
	
	@Override
	public void delete(String roleId) {
		// TODO Auto-generated method stub
		sysRoleRightDAO.deleteByRoleId(roleId);
		
	}
	@Override
	public void addRoleRight(SysRoleRight sysRoleRight) {
		// TODO Auto-generated method stub
		sysRoleRightDAO.save(sysRoleRight);
	}

	@Override
	public List<String> findByUserId(String userId) {
		return sysRoleRightDAO.findByUserId(userId);
	}

}
